Predicting Unroll Factors Using Nearest Neighbors
نویسندگان
چکیده
In order to deliver the promise of Moore’s Law to the end user, compilers must make decisions that are intimately tied to a specific target architecture. As engineers add architectural features to increase performance, systems become harder to model, and thus, it becomes harder for a compiler to make effective decisions. Machine-learning techniques may be able to help compiler writers model modern architectures. Because learning techniques can effectively make sense of high dimensional spaces, they can be a valuable tool for clarifying and discerning complex decision boundaries. In our work we focus on loop unrolling, a well-known optimization for exposing instruction level parallelism. Using the Open Research Compiler as a testbed, we demonstrate how one can use supervised learning techniques to model the appropriateness of loop unrolling. We use more than 1,100 loops — drawn from 46 benchmarks — to train a simple learning algorithm to recognize when loop unrolling is advantageous. The resulting classifier can predict with 88% accuracy whether a novel loop (i.e., one that was not in the training set) benefits from loop unrolling. Furthermore, we can predict the optimal or nearly optimal unroll factor 74% of the time. We evaluate the ramifications of these prediction accuracies using the Open Research Compiler (ORC) and the Itanium r © 2 architecture. The learned classifier yields a 6% speedup (over ORC’s unrolling heuristic) for SPEC benchmarks, and a 7% speedup on the remainder of our benchmarks. Because the learning techniques we employ run very quickly, we were able to exhaustively determine the four most salient loop characteristics for determining when unrolling is beneficial.
منابع مشابه
Title Predicting Unroll Factors Using Supervised Classification Authors
Compilers base many critical decisions on abstracted architectural models. While recent research has shown that modeling is effective for some compiler problems, building accurate models requires a great deal of human time and effort. This paper describes how machine learning techniques can be leveraged to help compiler writers model complex systems. Because learning techniques can effectively ...
متن کاملA Novel Hybrid Approach for Email Spam Detection based on Scatter Search Algorithm and K-Nearest Neighbors
Because cyberspace and Internet predominate in the life of users, in addition to business opportunities and time reductions, threats like information theft, penetration into systems, etc. are included in the field of hardware and software. Security is the top priority to prevent a cyber-attack that users should initially be detecting the type of attacks because virtual environments are not moni...
متن کاملA comparative study of performance of K-nearest neighbors and support vector machines for classification of groundwater
The aim of this work is to examine the feasibilities of the support vector machines (SVMs) and K-nearest neighbor (K-NN) classifier methods for the classification of an aquifer in the Khuzestan Province, Iran. For this purpose, 17 groundwater quality variables including EC, TDS, turbidity, pH, total hardness, Ca, Mg, total alkalinity, sulfate, nitrate, nitrite, fluoride, phosphate, Fe, Mn, Cu, ...
متن کاملPredicting Bus Arrivals Using One Bus Away Real-Time Data
6 Providing real-time bus arrival times can enhance the experience of riders using 7 public transit, but errors in the predictions can cause a decrease in ridership. 8 Using data collected from a local transit agency, we created models to predict 9 arrival times using K-Nearest Neighbors and Kernel Regression and seven sets 10 of features. The best feature set had a RMSE of 34 seconds, a large ...
متن کاملBetter Prediction of Protein Cellular Localization Sites with the it k Nearest Neighbors Classifier
We have compared four classifiers on the problem of predicting the cellular localization sites of proteins in yeast and E. coli. A set of sequence derived features, such as regions of high hydrophobicity, were used for each classifier. The methods compared were a structured probabilistic model specifically designed for the localization problem, the k nearest neighbors classifier, the binary dec...
متن کامل